import request from '@/utils/request'

export function tenantList(query) {
  return request({
    url: '/archive/guidance/tenantList',
    method: 'get',
    params: query
  })
}

// 获取档案树
export function getTreesList_JDZD(tenantCode) {
    return request({
      url: '/archive/guidance/gettrees?tenantCode='+tenantCode,
      method: 'get'
    })
  }


  // 上传文件
export function uploadFile(data) {
  return request({
    url: '/archive/guidanceFile/upload',
    method: 'post',
    data: data
  })
}
//获取ID
export function getUserMessage() {
  return request({
    url: '/archive/guidance/getUserMessage',
    method: 'get'
  })
}

// 文件列表
export function uploadFileList(query) {
  return request({
    url: '/archive/guidanceFile/list',
    method: 'get',
    params: query
  })
}
//保存建议
export function guidanceAdd(data) {
  return request({
    url: '/archive/guidance',
    method: 'POST',
    data:data
  })
}

//获取详情
export function guidanceDetail(query) {
  return request({
    url: '/archive/guidance/detail/'+query.id,
    method: 'GET',
   
  })
}



//修改建议

export function guidanceDeit(data) {
  return request({
    url: '/archive/guidance',
    method: 'PUT',
    data:data
  })
}

// 文件删除
export function deleteFile(id) {
  return request({
    url: '/archive/guidanceFile/'+id,
    method: 'delete'
  })
}

